namespace RBAC.Read.Api.Application.Dto.DataBashboard
{
    /// <summary>
    /// 产品报工列表 DTO（用于分页查询返回）
    /// </summary>
    public class ProductionDashboardListDto
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 报工时间
        /// </summary>
        public DateTime ReportTime { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string ProductName { get; set; } = string.Empty;

        /// <summary>
        /// 报工数量
        /// </summary>
        public int ReportQty { get; set; }

        /// <summary>
        /// 合格数量
        /// </summary>
        public int QualifiedQty { get; set; }

        /// <summary>
        /// 合格率（计算字段：合格数量/报工数量）
        /// </summary>
        public double PassRate => ReportQty > 0 ? (double)QualifiedQty / ReportQty : 0;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateUser { get; set; } = string.Empty;
    }
}
